/**
 * Created by Administrator on 2017/5/14.
 */
(function ($) {
    var app = {};
    app.elm = "#tb_departments";
    app.updateRow = function (row) {
        if (row == null || row == undefined) {
            return;
        }
        var data = $(app.elm).bootstrapTable('getData');
        for (i = 0; i < data.length; i++) {
            if (data[i].id == row.id) {
                $(app.elm).bootstrapTable('updateRow', {
                    index: i,
                    row: row
                });
            }
        }
    };
    app.removeRow = function (row) {
        $(app.elm).find("tr[data-uniqueid=" + row.id + "]").remove();
    };
    $.mytable = app;
}($));
